function userinfo(state = {}, action = { type: '', payload: null }) {
    var newstate = JSON.parse(JSON.stringify(state));
    switch (action.type) {
        case 'adduserinfo':
            newstate = action.payload
            return newstate;

        case 'adduserinfoimg':
            newstate.avatar = action.payload;
            return newstate;
        case 'addpersonalinfoimg':
            newstate = action.payload
            return newstate;
        default: return state;
    }
}
export default userinfo;